<template>
<div id="app">
  {{message}}
  <span v-for="user in users" v-bind:class="user.date=='2023-04-03'?bgColor:''" >
    {{user.date}}--{{user.name}}--{{user.pro}}--{{user.city}}--{{user.address}}<br>
    <button @click="look(user)">查看</button>
  </span>
</div>
</template>

<script>
export default {
  name: "AsdfVieeww",
  data(){
    return{
      message:'hello vue!',
      bgColor:'green',
      users:[
        {date:'2023-04-03',name:'王小虎',pro:'啤机区',city:'上海市',address:'上海市奉贤区'},
        {date:'2023-05-03',name:'王小虎',pro:'啤机区',city:'上海市',address:'上海市奉贤区'},
        {date:'2023-06-03',name:'王小虎',pro:'啤机区',city:'上海市',address:'上海市奉贤区'},
        {date:'2023-07-03',name:'王小虎',pro:'啤机区',city:'上海市',address:'上海市奉贤区'},
      ]

    }
  },methods:{
look(user){
  alert(JSON.stringify(user))
}
  },created() {

  }
}
</script>

<style scoped>
.green{
  background-color:green;
}
</style>